home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / imap / non-ANSI / c-client / mtx.h < prev    next >
C/C++ Source or Header  |  1994-05-10  |  4KB  |  141 lines

  1. /*
  2.  * Program:    MTX mail routines
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    22 May 1990
  13.  * Last Edited:    10 May 1994
  14.  *
  15.  * Copyright 1994 by the University of Washington
  16.  *
  17.  *  Permission to use, copy, modify, and distribute this software and its
  18.  * documentation for any purpose and without fee is hereby granted, provided
  19.  * that the above copyright notice appears in all copies and that both the
  20.  * above copyright notice and this permission notice appear in supporting
  21.  * documentation, and that the name of the University of Washington not be
  22.  * used in advertising or publicity pertaining to distribution of the software
  23.  * without specific, written prior permission.  This software is made
  24.  * available "as is", and
  25.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  26.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  27.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  28.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  29.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  31.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  32.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  33.  *
  34.  */
  35.  
  36. /* Build parameters */
  37.  
  38.  
  39. /* Command bits from mtx_getflags(), must correspond to mailbox bit values */
  40.  
  41. #define fSEEN 1
  42. #define fDELETED 2
  43. #define fFLAGGED 4
  44. #define fANSWERED 8
  45. #define fOLD 16            /* moby sigh */
  46.  
  47.  
  48. /* MTX I/O stream local data */
  49.  
  50. typedef struct mtx_local {
  51.   unsigned int inbox : 1;    /* if this is an INBOX or not */
  52.   unsigned int shouldcheck: 1;    /* if ping should do a check instead */
  53.   unsigned int mustcheck: 1;    /* if ping must do a check instead */
  54.   int fd;            /* file descriptor for I/O */
  55.   off_t filesize;        /* file size parsed */
  56.   time_t filetime;        /* last file time */
  57.   char *buf;            /* temporary buffer */
  58.   unsigned long buflen;        /* current size of temporary buffer */
  59. } MTXLOCAL;
  60.  
  61.  
  62. /* Convenient access to local data */
  63.  
  64. #define LOCAL ((MTXLOCAL *) stream->local)
  65.  
  66. /* Function prototypes */
  67.  
  68. DRIVER *mtx_valid  ();
  69. int mtx_isvalid  ();
  70. void *mtx_parameters  ();
  71. void mtx_find  ();
  72. void mtx_find_bboards  ();
  73. void mtx_find_all  ();
  74. void mtx_find_all_bboards  ();
  75. long mtx_subscribe  ();
  76. long mtx_unsubscribe  ();
  77. long mtx_subscribe_bboard  ();
  78. long mtx_unsubscribe_bboard  ();
  79. long mtx_create  ();
  80. long mtx_delete  ();
  81. long mtx_rename  ();
  82. MAILSTREAM *mtx_open  ();
  83. void mtx_close  ();
  84. void mtx_fetchfast  ();
  85. void mtx_fetchflags  ();
  86. ENVELOPE *mtx_fetchstructure  ();
  87. char *mtx_fetchheader  ();
  88. char *mtx_fetchtext  ();
  89. char *mtx_fetchbody  ();
  90. unsigned long mtx_header  ();
  91. void mtx_setflag  ();
  92. void mtx_clearflag  ();
  93. void mtx_search  ();
  94. long mtx_ping  ();
  95. void mtx_check  ();
  96. void mtx_snarf  ();
  97. void mtx_expunge  ();
  98. long mtx_copy  ();
  99. long mtx_move  ();
  100. long mtx_append  ();
  101. void mtx_gc  ();
  102.  
  103. int mtx_lock  ();
  104. void mtx_unlock  ();
  105. unsigned long mtx_size  ();
  106. char *mtx_file  ();
  107. long mtx_getflags  ();
  108. long mtx_parse  ();
  109. long mtx_copy_messages  ();
  110. MESSAGECACHE *mtx_elt  ();
  111. void mtx_update_status  ();
  112. char mtx_search_all  ();
  113. char mtx_search_answered  ();
  114. char mtx_search_deleted  ();
  115. char mtx_search_flagged  ();
  116. char mtx_search_keyword  ();
  117. char mtx_search_new  ();
  118. char mtx_search_old  ();
  119. char mtx_search_recent  ();
  120. char mtx_search_seen  ();
  121. char mtx_search_unanswered  ();
  122. char mtx_search_undeleted  ();
  123. char mtx_search_unflagged  ();
  124. char mtx_search_unkeyword  ();
  125. char mtx_search_unseen  ();
  126. char mtx_search_before  ();
  127. char mtx_search_on  ();
  128. char mtx_search_since  ();
  129. char mtx_search_body  ();
  130. char mtx_search_subject  ();
  131. char mtx_search_text  ();
  132. char mtx_search_bcc  ();
  133. char mtx_search_cc  ();
  134. char mtx_search_from  ();
  135. char mtx_search_to  ();
  136.  
  137. typedef char (*search_t)  ();
  138. search_t mtx_search_date  ();
  139. search_t mtx_search_flag  ();
  140. search_t mtx_search_string  ();
  141.